#!/bin/bash
# remove the pin-priority
sudo rm -rf /etc/apt/preferences.d/youtube-dl-backports
sudo rm -rf /etc/apt/preferences.d/yt-dlp-backports
purge_packages || error "Dependencies failed to uninstall"

if [ "$(get_codename)" == bookworm ];then
  remove_repofile_if_unused /etc/apt/sources.list.d/bookworm-backports.list
elif [ "$(get_codename)" == bullseye ];then
  remove_repofile_if_unused /etc/apt/sources.list.d/bullseye-backports.list
fi
